If BL2_AT_EL3 is enabled, bl2_run_next_image is called at the end of BL2.
This function calls disable_mmu_icache_secure.
It is then useless to call it in bl2_main in that case.
fixes arm-software/tf-issues#582
Signed-off-by: Yann Gautier <[email protected]>
/* Load the subsequent bootloader images. */
next_bl_ep_info = bl2_load_images();
+#if !BL2_AT_EL3
#ifdef AARCH32
/*
* For AArch32 state BL1 and BL2 share the MMU setup.
disable_mmu_icache_secure();
#endif /* AARCH32 */
-
-#if !BL2_AT_EL3
console_flush();
/*